﻿using Microsoft.Xna.Framework.Content;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace BeatingMole
{
    class CGuiMap : Game
    {
        #region "Variable"
        private ContentManager _content;
        private SpriteBatch _spriteBatch;
        private GameTime _gameTime;

        private CBusMap _map;            // Màn chơi              
        #endregion

        #region "Properties"
        #endregion

        #region "Constructor"
        public CGuiMap(ContentManager content, SpriteBatch spriteBatch, GameTime gameTime)
        {
            _content = content;
            _spriteBatch = spriteBatch;
            _gameTime = gameTime;
            _map = new CBusMap(content, spriteBatch, gameTime);                                     
        }
        #endregion

        #region "Method"
        /// <summary>
        /// Phương thức cập nhật của Map
        /// </summary>
        /// <param name="gameTime"></param>
        public void Update(GameTime gameTime)
        {          
            _map.UpdateMap(gameTime);           
        }

        /// <summary>
        /// Phương thức Draw của Map
        /// </summary>
        /// <param name="spriteBatch"></param>
        public void Draw(SpriteBatch spriteBatch)
        {            
            _map.DrawMap(spriteBatch);            
        }
        #endregion
    }
}
